<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.15"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>Library Evolutionary Algorithms for Clustering (LEAC): include/clustering_operator_label.hpp Source File</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectlogo"><img alt="Logo" src="leac_logo.png"/></td>
  <td id="projectalign" style="padding-left: 0.5em;">
   <div id="projectname">Library Evolutionary Algorithms for Clustering (LEAC)
   &#160;<span id="projectnumber">Version 1.0</span>
   </div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.15 -->
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
$(function() {
  initMenu('',false,false,'search.php','Search');
});
/* @license-end */</script>
<div id="main-nav"></div>
<div id="nav-path" class="navpath">
  <ul>
<li class="navelem"><a class="el" href="dir_d44c64559bbebec7f509842c48db8b23.html">include</a></li>  </ul>
</div>
</div><!-- top -->
<div class="header">
  <div class="headertitle">
<div class="title">clustering_operator_label.hpp</div>  </div>
</div><!--header-->
<div class="contents">
<a href="clustering__operator__label_8hpp.html">Go to the documentation of this file.</a><div class="fragment"><div class="line"><a name="l00001"></a><span class="lineno">    1</span>&#160;</div><div class="line"><a name="l00012"></a><span class="lineno">   12</span>&#160;<span class="preprocessor">#ifndef __CLUSTERING_OPERATOR_LABEL_HPP</span></div><div class="line"><a name="l00013"></a><span class="lineno">   13</span>&#160;<span class="preprocessor">#define __CLUSTERING_OPERATOR_LABEL_HPP</span></div><div class="line"><a name="l00014"></a><span class="lineno">   14</span>&#160;</div><div class="line"><a name="l00015"></a><span class="lineno">   15</span>&#160;<span class="preprocessor">#include &lt;vector&gt;</span></div><div class="line"><a name="l00016"></a><span class="lineno">   16</span>&#160;<span class="preprocessor">#include &quot;<a class="code" href="partition__disjsets_8hpp.html">partition_disjsets.hpp</a>&quot;</span></div><div class="line"><a name="l00017"></a><span class="lineno">   17</span>&#160;</div><div class="line"><a name="l00026"></a><span class="lineno">   26</span>&#160;<span class="keyword">namespace </span><a class="code" href="namespaceclusteringop.html">clusteringop</a> {</div><div class="line"><a name="l00027"></a><span class="lineno">   27</span>&#160;</div><div class="line"><a name="l00028"></a><span class="lineno">   28</span>&#160;<span class="comment">/*The second stage is a genetic algorithm, which will</span></div><div class="line"><a name="l00029"></a><span class="lineno">   29</span>&#160;<span class="comment">  merge some of these B_i&#39;s if they are close enough to one</span></div><div class="line"><a name="l00030"></a><span class="lineno">   30</span>&#160;<span class="comment">  another. </span></div><div class="line"><a name="l00031"></a><span class="lineno">   31</span>&#160;<span class="comment"></span></div><div class="line"><a name="l00032"></a><span class="lineno">   32</span>&#160;<span class="comment">*/</span></div><div class="line"><a name="l00033"></a><span class="lineno">   33</span>&#160;<span class="keyword">template</span> &lt; <span class="keyword">typename</span> T_CLUSTERIDX &gt;</div><div class="line"><a name="l00034"></a><span class="lineno">   34</span>&#160;std::vector&lt;T_CLUSTERIDX&gt;</div><div class="line"><a name="l00035"></a><span class="lineno">   35</span>&#160;<a class="code" href="namespaceclusteringop.html#aedd5103dd69d139b911013b98cf60709">bkinCiToMemberShip</a></div><div class="line"><a name="l00036"></a><span class="lineno"><a class="line" href="namespaceclusteringop.html#aedd5103dd69d139b911013b98cf60709">   36</a></span>&#160;(<span class="keyword">const</span> <a class="code" href="classpartition_1_1_partition_disj_sets.html">partition::PartitionDisjSets</a></div><div class="line"><a name="l00037"></a><span class="lineno">   37</span>&#160; &lt;T_CLUSTERIDX&gt;              &amp;aimembclassdisjsets_Bi,</div><div class="line"><a name="l00038"></a><span class="lineno">   38</span>&#160; <span class="keyword">const</span> <a class="code" href="classpartition_1_1_partition_disj_sets.html">partition::PartitionDisjSets</a></div><div class="line"><a name="l00039"></a><span class="lineno">   39</span>&#160; &lt;T_CLUSTERIDX&gt;              &amp;aimembclassdisjsets_BkinCi</div><div class="line"><a name="l00040"></a><span class="lineno">   40</span>&#160; )</div><div class="line"><a name="l00041"></a><span class="lineno">   41</span>&#160;{</div><div class="line"><a name="l00042"></a><span class="lineno">   42</span>&#160;  <span class="comment">/*#ifdef __VERBOSE_YES</span></div><div class="line"><a name="l00043"></a><span class="lineno">   43</span>&#160;<span class="comment">    ++geiinparam_verbose;</span></div><div class="line"><a name="l00044"></a><span class="lineno">   44</span>&#160;<span class="comment">    if ( geiinparam_verbose &lt;= geiinparam_verboseMax ) {</span></div><div class="line"><a name="l00045"></a><span class="lineno">   45</span>&#160;<span class="comment">    std::cout &lt;&lt; &quot;tsengyang2001_BkinCiToMemberShip:  IN&quot;</span></div><div class="line"><a name="l00046"></a><span class="lineno">   46</span>&#160;<span class="comment">    &lt;&lt; &#39;(&#39; &lt;&lt; geiinparam_verbose &lt;&lt; &#39;)&#39;</span></div><div class="line"><a name="l00047"></a><span class="lineno">   47</span>&#160;<span class="comment">    &lt;&lt; &quot;\n\t(input const partition::PartitionDisjSets&lt;&gt; &amp;aimembclassdisjsets_Bi[&quot;</span></div><div class="line"><a name="l00048"></a><span class="lineno">   48</span>&#160;<span class="comment">    &lt;&lt; &amp;aimembclassdisjsets_Bi &lt;&lt; &#39;]&#39; &lt;&lt; &quot; size: &quot; &lt;&lt; aimembclassdisjsets_Bi.size() &lt;&lt; &#39;\n&#39;;</span></div><div class="line"><a name="l00049"></a><span class="lineno">   49</span>&#160;<span class="comment">    aimembclassdisjsets_Bi.print();</span></div><div class="line"><a name="l00050"></a><span class="lineno">   50</span>&#160;<span class="comment">    std::cout &lt;&lt; &quot;\n\t input const partition::PartitionDisjSets&lt;&gt; &amp;aimembclassdisjsets_BkinCi[&quot; </span></div><div class="line"><a name="l00051"></a><span class="lineno">   51</span>&#160;<span class="comment">    &lt;&lt; &amp;aimembclassdisjsets_BkinCi &lt;&lt; &#39;]&#39; &lt;&lt; &quot; size: &quot; &lt;&lt; aimembclassdisjsets_BkinCi.size() &lt;&lt; &#39;\n&#39;;</span></div><div class="line"><a name="l00052"></a><span class="lineno">   52</span>&#160;<span class="comment">    aimembclassdisjsets_BkinCi.print();</span></div><div class="line"><a name="l00053"></a><span class="lineno">   53</span>&#160;<span class="comment">    std::cout &lt;&lt; &quot;\n\t)&quot;</span></div><div class="line"><a name="l00054"></a><span class="lineno">   54</span>&#160;<span class="comment">    &lt;&lt; std::endl;</span></div><div class="line"><a name="l00055"></a><span class="lineno">   55</span>&#160;<span class="comment">    }</span></div><div class="line"><a name="l00056"></a><span class="lineno">   56</span>&#160;<span class="comment">    #endif //__VERBOSE_YES*/</span></div><div class="line"><a name="l00057"></a><span class="lineno">   57</span>&#160;  </div><div class="line"><a name="l00058"></a><span class="lineno">   58</span>&#160;  <a class="code" href="common_8hpp.html#a3f6c33fb604556cdc425e7aa2289d009">uintidx</a> luintidx_numObj =</div><div class="line"><a name="l00059"></a><span class="lineno">   59</span>&#160;    aimembclassdisjsets_Bi.size();</div><div class="line"><a name="l00060"></a><span class="lineno">   60</span>&#160;  std::vector&lt;T_CLUSTERIDX&gt;</div><div class="line"><a name="l00061"></a><span class="lineno">   61</span>&#160;    lovectormmidx_memberShip</div><div class="line"><a name="l00062"></a><span class="lineno">   62</span>&#160;    (luintidx_numObj);</div><div class="line"><a name="l00063"></a><span class="lineno">   63</span>&#160;  </div><div class="line"><a name="l00064"></a><span class="lineno">   64</span>&#160;</div><div class="line"><a name="l00065"></a><span class="lineno">   65</span>&#160;  <span class="comment">// std::cout &lt;&lt; &quot;hola1&quot; &lt;&lt; std::endl;</span></div><div class="line"><a name="l00066"></a><span class="lineno">   66</span>&#160;  <span class="keywordflow">for</span> (<a class="code" href="common_8hpp.html#a3f6c33fb604556cdc425e7aa2289d009">uintidx</a> lui_i = 0; lui_i &lt; luintidx_numObj; lui_i++) {</div><div class="line"><a name="l00067"></a><span class="lineno">   67</span>&#160;    lovectormmidx_memberShip.at(lui_i) =</div><div class="line"><a name="l00068"></a><span class="lineno">   68</span>&#160;      aimembclassdisjsets_BkinCi.getClusterIdx(aimembclassdisjsets_Bi.getClusterIdx(lui_i));</div><div class="line"><a name="l00069"></a><span class="lineno">   69</span>&#160;    <span class="comment">//aivectormmidx_memberBkinCi[aimembclassdisjsets_Bi.getClusterIdx(lui_i)];</span></div><div class="line"><a name="l00070"></a><span class="lineno">   70</span>&#160;</div><div class="line"><a name="l00071"></a><span class="lineno">   71</span>&#160;    <span class="comment">//std::cout &lt;&lt; aimembclassdisjsets_Bi.getClusterIdx(luintidx_numObj) &lt;&lt; std::endl;</span></div><div class="line"><a name="l00072"></a><span class="lineno">   72</span>&#160;    <span class="comment">//aimembclassdisjsets_Bi.constfind(lui_i)</span></div><div class="line"><a name="l00073"></a><span class="lineno">   73</span>&#160;  }</div><div class="line"><a name="l00074"></a><span class="lineno">   74</span>&#160;</div><div class="line"><a name="l00075"></a><span class="lineno">   75</span>&#160;  <span class="comment">//std::cout &lt;&lt; &quot;hola2&quot;  &lt;&lt;std::endl;</span></div><div class="line"><a name="l00076"></a><span class="lineno">   76</span>&#160;</div><div class="line"><a name="l00077"></a><span class="lineno">   77</span>&#160;  <span class="comment">/*#ifdef __VERBOSE_YES</span></div><div class="line"><a name="l00078"></a><span class="lineno">   78</span>&#160;<span class="comment">    if ( geiinparam_verbose &lt;= geiinparam_verboseMax ) {</span></div><div class="line"><a name="l00079"></a><span class="lineno">   79</span>&#160;<span class="comment">    std::cout &lt;&lt; &quot;tsengyang2001_BkinCiToMemberShip: OUT&quot;</span></div><div class="line"><a name="l00080"></a><span class="lineno">   80</span>&#160;<span class="comment">    &lt;&lt; &#39;(&#39; &lt;&lt; geiinparam_verbose &lt;&lt; &#39;)&#39;</span></div><div class="line"><a name="l00081"></a><span class="lineno">   81</span>&#160;<span class="comment">    &lt;&lt; &quot;\nstd::vector&lt;T_CLUSTERIDX&gt; lovectormmidx_memberShip[&quot;</span></div><div class="line"><a name="l00082"></a><span class="lineno">   82</span>&#160;<span class="comment">    &lt;&lt; &amp;lovectormmidx_memberShip &lt;&lt; &quot;]\n&quot;;</span></div><div class="line"><a name="l00083"></a><span class="lineno">   83</span>&#160;<span class="comment">    vectort_print(lovectormmidx_memberShip,std::cout,&quot;&lt;MEMBERCLUSTER&quot;,&#39;,&#39;);</span></div><div class="line"><a name="l00084"></a><span class="lineno">   84</span>&#160;<span class="comment">    //&lt;&lt; &quot;\noutput std::vector&lt;std::list&lt;uintidx&gt; &gt;&amp;&amp; lvectorlistcomponent_setBi[&quot; </span></div><div class="line"><a name="l00085"></a><span class="lineno">   85</span>&#160;<span class="comment">    //        &lt;&lt; &amp;lvectorlistcomponent_setBi &lt;&lt; &quot;]\n&quot;;</span></div><div class="line"><a name="l00086"></a><span class="lineno">   86</span>&#160;<span class="comment">    }</span></div><div class="line"><a name="l00087"></a><span class="lineno">   87</span>&#160;<span class="comment">    --geiinparam_verbose;</span></div><div class="line"><a name="l00088"></a><span class="lineno">   88</span>&#160;<span class="comment">    #endif __VERBOSE_YES*/</span></div><div class="line"><a name="l00089"></a><span class="lineno">   89</span>&#160;  </div><div class="line"><a name="l00090"></a><span class="lineno">   90</span>&#160;  <span class="keywordflow">return</span> lovectormmidx_memberShip;</div><div class="line"><a name="l00091"></a><span class="lineno">   91</span>&#160;}</div><div class="line"><a name="l00092"></a><span class="lineno">   92</span>&#160;</div><div class="line"><a name="l00093"></a><span class="lineno">   93</span>&#160;} <span class="comment">/*END namespace clusteringop*/</span></div><div class="line"><a name="l00094"></a><span class="lineno">   94</span>&#160;  </div><div class="line"><a name="l00095"></a><span class="lineno">   95</span>&#160;<span class="preprocessor">#endif </span><span class="comment">/*__CLUSTERING_OPERATOR_LABEL_HPP*/</span><span class="preprocessor"></span></div><div class="ttc" id="classpartition_1_1_partition_disj_sets_html"><div class="ttname"><a href="classpartition_1_1_partition_disj_sets.html">partition::PartitionDisjSets</a></div><div class="ttdoc">Partition of instances in base DisjSets data structure.</div><div class="ttdef"><b>Definition:</b> <a href="partition__disjsets_8hpp_source.html#l00037">partition_disjsets.hpp:37</a></div></div>
<div class="ttc" id="namespaceclusteringop_html"><div class="ttname"><a href="namespaceclusteringop.html">clusteringop</a></div><div class="ttdoc">Clustering operators.</div></div>
<div class="ttc" id="common_8hpp_html_a3f6c33fb604556cdc425e7aa2289d009"><div class="ttname"><a href="common_8hpp.html#a3f6c33fb604556cdc425e7aa2289d009">uintidx</a></div><div class="ttdeci">uint32_t uintidx</div><div class="ttdef"><b>Definition:</b> <a href="common_8hpp_source.html#l00020">common.hpp:20</a></div></div>
<div class="ttc" id="partition__disjsets_8hpp_html"><div class="ttname"><a href="partition__disjsets_8hpp.html">partition_disjsets.hpp</a></div><div class="ttdoc">Partition based on structure of disjoint joint data.</div></div>
<div class="ttc" id="namespaceclusteringop_html_aedd5103dd69d139b911013b98cf60709"><div class="ttname"><a href="namespaceclusteringop.html#aedd5103dd69d139b911013b98cf60709">clusteringop::bkinCiToMemberShip</a></div><div class="ttdeci">std::vector&lt; T_CLUSTERIDX &gt; bkinCiToMemberShip(const partition::PartitionDisjSets&lt; T_CLUSTERIDX &gt; &amp;aimembclassdisjsets_Bi, const partition::PartitionDisjSets&lt; T_CLUSTERIDX &gt; &amp;aimembclassdisjsets_BkinCi)</div><div class="ttdef"><b>Definition:</b> <a href="clustering__operator__label_8hpp_source.html#l00036">clustering_operator_label.hpp:36</a></div></div>
</div><!-- fragment --></div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
Generated on Fri Apr 19 2019 08:58:31 for Library Evolutionary Algorithms for Clustering (LEAC) by &#160;<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.8.15
</small></address>
</body>
</html>
